<?php
class Conexao {
	private static $con = null;
  
	public static function getConexao() {
		if (is_null(self::$con)) {
			$servername = "localhost";
			$database 	= "mtd";
			$user		= "root";
			$pass		= "";
			$options	= array(PDO::ATTR_AUTOCOMMIT=>FALSE, 
								PDO::ATTR_PERSISTENT=>FALSE);
			
			self::$con 	= new PDO("mysql:host=$servername;dbname=$database", $user, $pass, $options);
		}
		return self::$con;
	}
}
?>